Skip to content

Conversation

@wenwenhua
Copy link
Collaborator

No description provided.

return { prop, value }
} else {
error(`Value of ${prop} in ${selector} selector only support value <url()> or <linear-gradient()>, received ${value}, please check again!`)
value !== 'none' && error(`Value of ${prop} in ${selector} selector only support value <url()> or <linear-gradient()>, received ${value}, please check again!`)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不应该在这里处理,应该在上面条件中识别none,并且返回none,在运行时中处理none

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

否则通过css var声明的none同样无法得到正确处理

if (value === 'none') {
return [
{ prop: bgPropMap.image, value },
{ prop: bgPropMap.color, value: 'transparent' }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要color吧?

const { textStyle, backgroundStyle, innerStyle = {} } = splitStyle(normalStyle)

enableBackground = enableBackground || !!backgroundStyle
enableBackground = enableBackground || (!!backgroundStyle && backgroundStyle.backgroundImage !== 'none')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不应该影响enableBackground,应该在parseBgImage中修改if (!text || text==='none') return {}

@hiyuki hiyuki merged commit 73c56a9 into master Oct 10, 2025
6 checks passed
@hiyuki hiyuki deleted the fix-bgimage-none branch October 10, 2025 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants